Skip to content

Update test-projects to net8.0 #416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Thorium
Copy link
Member

@Thorium Thorium commented Apr 14, 2025

This PR just updates test-projects from .NET 5 to .NET 8.

But this doesn't fix all the issues with the test-projects.

@Thorium
Copy link
Member Author

Thorium commented Apr 15, 2025

One already existing issue is that VS2022 still uses net48, so meanwhile the example projects work in dotnet.exe and VSCode, they don't compile in VS2022.

@sergey-tihon sergey-tihon requested a review from Copilot May 13, 2025 06:47
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the test-projects and example projects to use .NET 8.0 and adjusts the target frameworks for runtime/design-time projects accordingly.

  • Update test projects from net5.0 to net8.0
  • Modify runtime and design-time projects to support multiple target frameworks (netstandard2.0 and netstandard2.1)
  • Update SDK versions and related tooling configurations in global.json and dotnet-tools.json

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/FSharp.TypeProviders.SDK.Tests.fsproj Updated target framework from net5.0 to net8.0; LangVersion remains unchanged
templates/content/basic/tests/MyProvider.Tests/MyProvider.Tests.fsproj Updated target framework from net5.0 to net8.0
templates/content/basic/src/MyProvider.Runtime/MyProvider.Runtime.fsproj Changed target framework from netstandard2.1 to multiple targets (netstandard2.0;netstandard2.1)
templates/content/basic/src/MyProvider.DesignTime/MyProvider.DesignTime.fsproj Changed target framework from netstandard2.1 to multiple targets (netstandard2.0;netstandard2.1)
templates/content/basic/global.json Updated SDK version from 5.0.400 to 8.0.400
templates/content/basic/.config/dotnet-tools.json Updated paket version and added rollForward setting
examples/StressProvider/StressProvider.fsproj Changed target framework from netstandard2.1 to multiple targets (netstandard2.0;netstandard2.1)
examples/StressProvider.Tests/StressProvider.Tests.fsproj Updated target framework from net5.0 to net8.0
examples/BasicProvider.Tests/BasicProvider.Tests.fsproj Updated target framework from net5.0 to net8.0
examples/BasicProvider.Runtime/BasicProvider.Runtime.fsproj Changed target framework and added ProduceReferenceAssembly configuration
examples/BasicProvider.DesignTime/BasicProvider.DesignTime.fsproj Changed target framework from netstandard2.1 to multiple targets (netstandard2.0;netstandard2.1)
Comments suppressed due to low confidence (2)

tests/FSharp.TypeProviders.SDK.Tests.fsproj:5

  • [nitpick] Consider updating LangVersion to a version that supports .NET 8 if applicable, to take advantage of the latest language features.
      <LangVersion>5.0</LangVersion>

examples/BasicProvider.Runtime/BasicProvider.Runtime.fsproj:9

  • [nitpick] Verify that setting ProduceReferenceAssembly to false is intentional and aligns with the project's packaging and consumption strategy.
    <ProduceReferenceAssembly>false</ProduceReferenceAssembly>

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why netstandard2.1 target is needed?

@Thorium
Copy link
Member Author

Thorium commented May 13, 2025

This was originally because net8.0 raises some compiler warnings if you have a netstandard2.0 reference. This is an old PR, and since then, Microsoft has yet again changed its policies. Now I think all the netstandard2.1 should be replaced with net8.0 directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants